var app = getApp()
var urlList = require('../../utils/base.js');
Page({
	data: {
    baseUrl: urlList.baseUrl,
		shopList: [],
		locationCity: ''
	},
	loadBanner: function () {
		var _this = this;
		wx.request({
      url: urlList.newsUrl,
			header: { 'content-type': 'application/x-www-form-urlencoded' },
			method: 'get',
            data: { type: 2 },//装修产品
			success: function (res) {
				console.log(res)
				wx.hideLoading()
				// wx.stopPullDownRefresh()
				// if (res.data.errorNo >= 0) {
					_this.setData({
            shopList: res.data.data.records
					})
				// }
			}
		})
	},
	onPullDownRefresh: function () {
		this.loadBanner();
	},
	onLoad: function () {
		this.setData({
			locationCity: wx.getStorageSync('locationCity')
		})
		wx.showLoading({ title: '加载中', mask: true })
		this.loadBanner()
	}
})
